<h1>
<?php if(empty($this->pageModel->keywords)){?>
All the Books around this area ...
<?php } else {?>
<span style="font-size:18px;letter-spacing:-1px;">Search results for</span> "<?php echo $this->pageModel->keywords;?>"</span>
<?php }?></h1>
<div class="explainLine">
<?php
echo $this->paginationControl($this->paginator, 'Sliding', 'paginationWithQ.phtml',array('controller'=>'book','action'=>'list','keywords'=>$this->keywords)); ?>
</div>

<ul class="books">
<div class="dotline"></div>
<?php
$book = new Book(); 
foreach ($this->paginator as $result) {?>
<li>
    <div class="bookImg">
    	<img src="<?php

$config = Zend_Registry::get('config');
		$baseUrl = $config->baseurl;
		
		if (!empty($result[Custom_Search_Lucene_Document::SMALL_IMAGE])) {
			echo "http://".$result[Custom_Search_Lucene_Document::SMALL_IMAGE];
		} else {
			echo $baseUrl."/img/no_pic_book_m.jpg";
		}
    	  ?>"/>
    </div>
    
    <div class="bookDesc">
    	<h2><a href="<?php echo $this->url(array("controller"=>"book", "action"=>"detail", "id"=>$result[Custom_Search_Lucene_Document::ISBN]), "default", true); ?>">
		<?php echo $result[Custom_Search_Lucene_Document::NAME]; ?></a></h2>
	<span><?php if (isset($result[Custom_Search_Lucene_Document::AUTHOR]))echo 'by '.$result[Custom_Search_Lucene_Document::AUTHOR]; ?>
	(<?php echo $result[Custom_Search_Lucene_Document::BINDING].' - '.$result[Custom_Search_Lucene_Document::PUBLICATION_DATE];?>)</span>
	<?php 
	$bookObj = $book->findById($result[Custom_Search_Lucene_Document::KEY]);
	$this->pageModel->setBook($bookObj);
	$userCity = $this->userCity();
    $bookConditionsAmount = $this->pageModel->getBookConditionsAmount($userCity->id);
    ?>
    <div class="bookItems"><div class="bookItem"><?php echo $bookConditionsAmount["New"]?> New, <?php echo $bookConditionsAmount["Used"]?> Used, <?php echo $bookConditionsAmount["eBook"]?> EBook.</div></div>
		</div>
</li>
<div class="dotline"></div>
<?php }
?>
</ul>